import React, { useState } from 'react'

interface IProps{
  username:string,
  timelong:number
}

interface music{
  name:string,
  author:string,
  timelong:number,
  publishDate:Date
}

export default function FuncCom(props:IProps) {

  const [count,setCount] = useState<number>(12);

  const [list,setList] = useState<Array<music>>([{
    name:"分手快乐",
    author:"王义鑫",
    timelong:400,
    publishDate:new Date()
  }]);

  return (
    <>
    <div>函数式组件使用ts</div>
    <p>username:{props.username}</p>
    <p>timelong:{props.timelong}</p>
    
    </>
  )
}
